package com.demo.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import com.demo.feign.fallback.CustomServiceApiFallBack;

/**
 * @author yexi
 */
@FeignClient(value = "customService", path = "/api", fallback = CustomServiceApiFallBack.class)
public interface CustomServiceApi {

    @PostMapping(path = "/test1")
    Integer test1(@RequestParam("a") Integer a, @RequestParam("b") Integer b);

    @GetMapping(path = "/test2")
    Integer test2Get();

    @PostMapping(path = "/test2")
    Integer test2Post();

    @PostMapping(path = "/test3/other")
    String test3();

    @PostMapping(path = "/test3/aim")
    String test4();

    @GetMapping(path = "/test3/other")
    String test5();

    @GetMapping(path = "/test3/aim")
    String test6();

    @RequestMapping(path = "/test3/other", method = RequestMethod.POST)
    String test7();

    @RequestMapping(path = "/test3/aim", method = RequestMethod.GET)
    String test8();


}
